package com.feixiang.feixiangpicturebackend;
import org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
@MapperScan("com.feixiang.feixiangpicturebackend.mapper")
@EnableAspectJAutoProxy(exposeProxy = true)
//解释一下 exposeProxy = true 的作用：通过 Spring AOP 提供对当前代理对象的访问，使得可以在业务逻辑中访问到当前的代理对象。你可以在方法执行时通过 AopContext.currentProxy() 获取当前的代理对象。
@SpringBootApplication(exclude = {ShardingSphereAutoConfiguration.class})  //禁用shardingsphere的自动配置分库分表

@EnableAsync //开启异步任务
public class FeixiangPictureBackedApplication {
    public static void main(String[] args) {
        SpringApplication.run(FeixiangPictureBackedApplication.class, args);
    }

}
